<?php
include_once ("DatabaseManager.php");
include_once ("UserDirectory.php");
include_once ("ZipContainer.php");

session_start();

$user_dir = $_SESSION['user_dir'];
$zip = $_SESSION['zip']; 

$template_name = $user_dir->getTemplateName();
$zip_file = $zip->getSystemFilename(); 

header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=".$template_name.".zip");

readfile($zip_file);

?>